package icu.sunway.gushenBlogBackEnd.utils;

import java.util.Random;

public class VerifyCodeGenerator {
    public static String generateVerifyCode() {
        Random randGenerator = new Random();
        String codeDictionary = "0123456789";
        StringBuilder res = new StringBuilder();
        for (int i = 0; i < 6; i++) {
            res.append(codeDictionary.charAt(randGenerator.nextInt(9)));
        }
        return res.toString();
    }
}
